import random
c = 1
while True:
    num = random.randint(0, 10)
    n = int(input('输入一个数字:'))
    if n > num:
        print('猜大了')
    elif n < num:
        print('猜小了')
    else:
        print(f'猜次为:{c}')
        break
    c += 1